import service from '../server'

// 发送验证码
export const authGetCode = (data) => {
    return service.post('/api/v1/auth/code/send', data)
}

// 登录
export const authLogin = (data) => {
    return service.post('/api/v1/auth/login', data)
}

// 退出
export const authLoginOut = () => {
    return service.get('/api/v1/user/logout')
}

// 注册
export const authRegister = (data) => {
    return service.post('/api/v1/user/register', data)
}

// 获取微信登录二维码 
export const authQrCode = () => {
    return service.get('/api/v1/auth/login/wx/qrcode')
}

// 检查二维码状态
export const authCheckQrCode = (data) => {
    return service.post('/api/v1/auth/login/wx/qrcode/check', data)
}

// 机主认证
export const authProvider = (data) => {
    return service.post('/api/v1/user/provider', data)
}